<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class New extends Model
{
    public static function Adds(Request $request)
    {
        $data['newsname']=$request['newsname'];
        $data['news']=$request['news'];
        $data['newstime']=$request['newstime'];
        return DB::table('news')->insert($data);
    }
    public static function Shows(Request $request)
    {
        return DB::table('news')->paginate(5);
    }
}

